package com.zy.Domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;

public class Person
{
    public String a;
    protected String b;
    String c;
    private String d;

    private String name;
    private Integer age;
    private String gender;



    //@JsonIgnore//忽略该属性
    @JsonFormat(pattern = "yyyy-MM-dd")//设置日期格式xxxx年xx月xx日
    private Date birthday;

    public Person()
    {
        System.out.println("Person的无参构造方法被调用！");
    }

    public Person(String a, String b)
    {
        this.a = a;
        this.b = b;
    }

    @Override
    public String toString()
    {
        return "Person{" +
                "a='" + a + '\'' +
                ", b='" + b + '\'' +
                ", c='" + c + '\'' +
                ", d='" + d + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", birthday=" + birthday +
                '}';
    }

    public Date getBirthday()
    {
        return birthday;
    }
    public void setBirthday(Date birthday)
    {
        this.birthday = birthday;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Integer getAge()
    {
        return age;
    }

    public void setAge(Integer age)
    {
        this.age = age;
    }

    public String getGender()
    {
        return gender;
    }

    public void setGender(String gender)
    {
        this.gender = gender;
    }

    public void eat()
    {
        System.out.println("eat----");
    }
    public void eat(String food)
    {
        System.out.println("eat----"+food);
    }
    protected void sleep()
    {
        System.out.println("sleep----");
    }

    private void play()
    {
        System.out.println("play----");
    }
}
